<span page-title>{{ 'Host Collections' | translate }}</span>

<div data-extend-template="layouts/table-with-header.html">

  <div data-block="header">
    <h2 translate>Host Collections</h2>
  </div>

  <div data-block="list-actions">
    <button type="button" class="btn btn-primary"
            ui-sref="host-collections.new"
            ng-hide="denied('create_host_collections')">
      {{ "Create Host Collection" | translate }}
    </button>
  </div>

  <span data-block="no-rows-message" translate>
    You currently don't have any Host Collections, you can add Host Collections using the button on the right.
  </span>

  <span data-block="no-search-results-message" translate>
    Your search returned zero Host Collections.
  </span>

  <div data-block="table">
    <table class="table table-striped table-bordered" ng-class="{'table-mask': table.working}">
      <thead>
      <tr bst-table-head>
        <th bst-table-column="name" sortable><span translate>Name</span></th>
        <th bst-table-column="hosts"><span translate>Content Hosts</span></th>
        <th bst-table-column="limit"><span translate>Limit</span></th>
      </tr>
      </thead>

      <tbody>
      <tr bst-table-row ng-repeat="hostCollection in table.rows">
        <td bst-table-cell>
          <a ui-sref="host-collection.info({hostCollectionId: hostCollection.id})">
            {{ hostCollection.name }}
          </a>
          <i class="fa fa-chevron-right selected-icon" ng-show="hostCollection.selected"></i>
        </td>
        <td bst-table-cell>
          <a ui-sref="host-collection.hosts.list({hostCollectionId: hostCollection.id})">
            {{ hostCollection.total_hosts }}
          </a>
        </td>
        <td bst-table-cell>{{ hostCollection.max_hosts | unlimitedFilter:hostCollection.unlimited_hosts }}</td>
      </tr>
      </tbody>
    </table>
  </div>
</div>
